Monday, October 06, 2008

TinyMCE for specific textareas

As per example code of the tinyMCE, its convert all Textareas on the HTML pages into
WYSIWUG editor, which is really stupid stuff by them though.

I have searched a lot about allowing tinyMCE for particular Textareas on the page and its really a common discussion topic on the forum but I haven't got any satisfactory answer. I dont know why all answers are only for Dupal implementation grrrrrrrrr.

Then I looked into tiny_mce.js and I found something like "spefic_textarea" and I searched into tinyMCE manual for this keyword (http://wiki.moxiecode.com/index.php/Special:Search?ns100=1&ns106=1&ns108=1&search=specific_textareas&searchx=Search) and found some help.

Heres is code which will solve your problem.

tinyMCE.init({
// General options
mode : "exact",
elements : "textarea_id1,textarea_id2", // just pass the ID's of your textarea for which you
// want to add the editor

// Your code related other settings, keep it same

cheers..

16 comments:

Anonymous said...

very good post
i was in search of it

Anonymous said...

Vikrant,
ur great man.

saved a lot of time. :)

Anonymous said...

thanks, prolly saved me a buttload of time.

Anonymous said...

Great job! This help me to define what to do with texareas.

Thanks a lot!

Julie Marie said...

Thank you so much...exactly what I was looking for!!

Martin said...

Thank you for this, it helped me a lot!

jerry said...

Thanks Vikrant, that was very helpful

bobby said...

Hi, vikrant,
it helped me a lot.. thanks

gudmunson said...

Excellent! I was wondering how this was done...

Unknown said...

thanks a lot!

Rishi said...

Thank you very much dear.
You really helped me.

Pragam Kumar Srivastava said...

Thanks Vikrant.......................

Raj said...

Thanks Vikrant

BDT Systems said...

Excellent, thank you!

arvind said...

Its working I have already implemented on my website Openplus
with responsive file manager

Unknown said...

I have struggled with the same problem. now fixed. Thanx Vikrant